/*
 * Stack.h
 *
 *  Created on: 07.01.2013
 *      Author: phru
 */

#ifndef STACK_H_
#define STACK_H_

#include <stdio.h>

#define STACKSIZE  20

typedef struct stack {
	/*Member declaration*/
	int _current;
	int _stackSize;
	int _stackSpace[STACKSIZE];

	/**
	 * Method definitions
	 */
	int (*pop)(struct stack* pThis);
	void (*push)(int value, struct stack* pThis);
	int (*top)(struct stack* pThis);
	void (*print)(struct stack* pThis);
} stack_t;

/**
 * Create stack object
 */
stack_t* createStack(void);


/**
 * Pop top item from stack
 */
int pop(stack_t* pThis);

/**
 * Push item on stack
 */
void push(int value, stack_t* pThis);

/**
 * Return top item without removing it
 */
int top(stack_t* pThis);

/**
 * Print stack content
 */
void print(stack_t* pThis);

#endif /* STACK_H_ */
